#pragma once
#include "Lines.h"
class Points
{
public:
	int n;
	PoINT p[100];
	Points(void);
	~Points(void);
	void Add(int x,int y);
	void Remove(int index);
	void Update(int x,int y);
};
void Points::Update(int x,int y)
{
	for(int i =0;i<100;i++)
	{
		if(x == p[i].x && y == p[i].y)
		{
			Remove(i);
			return;
		}
	}
	Add(x,y);
}
void Points::Remove(int index)
{
	p[index].x = p[index].y = -1;
	n--;
}
void Points::Add(int x,int y)
{
	for(int i =0;i<100;i++)
	{
		if(p[i].x ==-1 && p[i].y == -1)
		{
			p[i].x =x;
			p[i].y =y;
			n++;
			return;
		}
	}
}
Points::Points(void)
{
	n=0;
	for(int i =0;i<100;i++)
		p[i].x = p[i].y = -1;
}

Points::~Points(void)
{

}